import Vue from 'vue'
import App from './App'
import './uni.promisify.adaptor'
import store from '@/store'



import musicHead from '@/components/musicHead/musicHead.vue'
// import playTab from '@/components/playTab.vue'
Vue.component('musicHead', musicHead)
// Vue.component('playTab',playTab)



// import myImage from '@/components/myImage.vue'
// Vue.component('my-image', myImage)
// 图片懒加载


Vue.filter('formatCount', (val) => {
  if (val > 10000 && val <= 100000000) {
    val = val / 10000;
    return val.toFixed(1) + '万';
  } else if (val > 100000000) {
    val /= 100000000;
    return val.toFixed(1) + '亿';
  } else {
    return val;
  }
})
//格式化时间
Vue.filter('formatTime', function (value) {
  let date = new Date(value);
  return date.getFullYear() + '年' + (date.getMonth() + 1) + '月' + date.getDate() + '日';
});

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
  ...App,
  store
})
app.$mount()
